import os

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


class DevelopConfig(object):
    DEBUG = True
    SECRET_KEY = "*)asdfasd&fsadffasdf(^(#$#8423!#"
    # 数据库链接配置:
    # 数据类型://登录账号:登录密码@数据库主机IP:数据库访问端口/数据库名称
    # SQLALCHEMY_DATABASE_URI = "mysql://root:123@127.0.0.1:3306/flask_students"
    SQLALCHEMY_DATABASE_URI = 'sqlite:///../datas/pms.db'
    # 设置mysql的错误跟踪信息显示
    SQLALCHEMY_TRACK_MODIFICATIONS = True
    # 打印每次模型操作对应的SQL语句
    SQLALCHEMY_ECHO = True


class ProductpConfig(object):
    DEBUG = False
    SECRET_KEY = "*)asdfasd&fsadffasdf(^(#$#8423!#"
    # 数据库链接配置:
    # 数据类型://登录账号:登录密码@数据库主机IP:数据库访问端口/数据库名称
    # SQLALCHEMY_DATABASE_URI = "mysql://root:123@127.0.0.1:3306/flask_students"
    SQLALCHEMY_DATABASE_URI = 'sqlite:///../datas/pms.db'
    # 设置mysql的错误跟踪信息显示
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    # 打印每次模型操作对应的SQL语句
    SQLALCHEMY_ECHO = False


envs = {
    "development": DevelopConfig,
    "product": ProductpConfig
}
